
<?php
    $url = new Url();
?>

<script type="text/javascript">

    loadBoxTienIch();

    loadBoxVip();

    loadBoxKetQua();
    
    function loadBoxKetQua(){
        var url = "<?=$url->createUrl('home/boxketqua');?>";
        $.ajax({
            type: "POST",
            url: url,
            global: false,
            data:{},
            success: function(msg){
                $("#boxketqua").html(msg);
            }
        });
    }

    function loadBoxTienIch(){
        var url = "<?=$url->createUrl('home/boxtienich');?>";
        $.ajax({
            type: "POST",
            url: url,
            global: false,
            data:{},
            success: function(msg){
                $("#boxtienich").html(msg);
            }
        });
    }

    function loadBoxVip(){
        var url = "<?=$url->createUrl('home/boxvip');?>";
        $.ajax({
            type: "POST",
            url: url,
            global: false,
            data:{},
            success: function(msg){
                $("#boxvip").html(msg);
            }
        });
    }
    
</script>

<div class="leftMain">
    <div class="titleCHAT"> Thống kê loto tới ngưỡng gan cực đại </div>
    <div class="SM">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr class="bg_cam">
                <td class="SM_1"><p>Bộ Số</p></td>
                <td class="SM_1"><p>Cực đại(Lần quay)</p></td>
                <td class="SM_1"><p>Khoảng thời gian</p></td>
                <td class="SM_1"><p>Chưa về(Lần quay)</p></td>
                <td class="SM_1"><p>Ngày về gần nhất</p></td>
            </tr>
        </table>
        <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#e6e6e6">
            
            <?php for($i=0;$i<count($data);$i++){?>
            <tr class="bg_white">
                <td class="SM_1">
                    <?php echo $data[$i]['boso'];?>
                </td>
                <td class="SM_1">
                    <?php echo $data[$i]['lanquay_cucdai'];?>
                </td>
                <td class="SM_1">
                    <?php //echo $data[$i]['boso'];?>
                </td>
                <td class="SM_1">
                    <?php echo $data[$i]['lanquay_chuave'];?>
                </td>
                <td class="SM_1">
                    <?php echo $data[$i]['end_date'];?>
                </td>
            </tr>
            <?php }?>
            
        </table>
    </div>
</div>


<div class="rightMain">

    <div class="Box" id="boxvip"></div>
    
    <div class="Box" id="boxtienich"></div>

    <div class="Box" id="boxketqua"></div>

        </div> <!--right-->
        <div class="both"></div>